<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
        <head>
          <title>akka.agent.Agent</title>
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
          
      <link type="text/css" media="screen" rel="stylesheet" href="../../lib/template.css" />
      <script type="text/javascript" src="../../lib/jquery.js"></script>
      <script type="text/javascript" src="../../lib/jquery-ui.js"></script>
      <script type="text/javascript" src="../../lib/template.js"></script>
      <script type="text/javascript" src="../../lib/tools.tooltip.js"></script>
    
        </head>
        <body class="type">
      <div id="definition">
        <a title="Go to companion" href="Agent$.html"><img src="../../lib/class_to_object_big.png" /></a>
        <p id="owner"><a name="akka" class="extype" href="../package.html">akka</a>.<a name="akka.agent" class="extype" href="package.html">agent</a></p>
        <h1><a title="Go to companion" href="Agent$.html">Agent</a></h1>
      </div>

      <h4 class="signature" id="signature">
      <span class="kind">class</span>
      <span class="symbol">
        <span class="name">Agent</span>
        <span class="tparams">[<span name="T">T</span>]</span>
        <span class="result"> extends AnyRef</span>
      </span>
      </h4>
      
          <div class="fullcommenttop" id="comment"><div class="comment cmt"><p>The Agent class was inspired by agents in Clojure.</p><p>Agents provide asynchronous change of individual locations. Agents
are bound to a single storage location for their lifetime, and only
allow mutation of that location (to a new state) to occur as a result
of an action. Update actions are functions that are asynchronously
applied to the Agent's state and whose return value becomes the
Agent's new state. The state of an Agent should be immutable.</p><p>While updates to Agents are asynchronous, the state of an Agent is
always immediately available for reading by any thread (using <i>get</i>
or <i>apply</i>) without any messages.</p><p>Agents are reactive. The update actions of all Agents get interleaved
amongst threads in a thread pool. At any point in time, at most one
<i>send</i> action for each Agent is being executed. Actions dispatched to
an agent from another thread will occur in the order they were sent,
potentially interleaved with actions dispatched to the same agent from
other sources.</p><p>If an Agent is used within an enclosing transaction, then it will
participate in that transaction. Agents are integrated with the STM -
any dispatches made in a transaction are held until that transaction
commits, and are discarded if it is retried or aborted.
<br/><br/></p><p>Example of usage:</p><pre>
val agent = Agent(5)

agent send (_ * 2)

...

val result = agent()
// use result ...

agent.close
</pre><p><br/></p><p>Agent is also monadic, which means that you can compose operations using
for-comprehensions. In monadic usage the original agents are not touched
but new agents are created. So the old values (agents) are still available
as-is. They are so-called 'persistent'.
<br/><br/></p><p>Example of monadic usage:</p><pre>
val agent1 = Agent(3)
val agent2 = Agent(5)

for (value &lt;- agent1) {
  result = value + 1
}

val agent3 = for (value &lt;- agent1) yield value + 1

val agent4 = for {
  value1 &lt;- agent1
  value2 &lt;- agent2
} yield value1 + value2

agent1.close
agent2.close
agent3.close
agent4.close
</pre></div><div class="toggleContainer block">
          <span class="toggle">Linear Supertypes</span>
          <div class="superTypes hiddenContent">AnyRef, <span name="scala.Any" class="extype">Any</span></div>
        </div></div>
        

      <div id="template">

        <div id="mbrsel">
          <div id="textfilter"><span class="pre"></span><span class="input"><input accesskey="/" type="text" /></span><span class="post"></span></div>
          <div id="order">
                <span class="filtertype">Ordering</span>
                <ol><li class="alpha in"><span>Alphabetic</span></li><li class="inherit out"><span>By inheritance</span></li></ol>
              </div>
          <div id="ancestors">
                <span class="filtertype">Inherited</span>
                <ol><li class="hideall out"><span>Hide All</span></li>
                <li class="showall in"><span>Show all</span></li></ol>
                <ol id="linearization"><li name="akka.agent.Agent" class="in"><span>Agent</span></li><li name="scala.AnyRef" class="in"><span>AnyRef</span></li><li name="scala.Any" class="in"><span>Any</span></li></ol>
              </div>
          <div id="visbl">
              <span class="filtertype">Visibility</span>
              <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol>
            </div>
        </div>

        <div class="members" id="constructors">
              <h3>Instance Constructors</h3>
              <ol><li visbl="pub" name="akka.agent.Agent#this" data-isabs="false">
      <a id="this:Agent[T]"></a>
      <h4 class="signature">
      <span class="kind">new</span>
      <span class="symbol">
        <span class="name">Agent</span>
        
        <span class="params">(<span name="initialValue">initialValue: T</span>, <span name="system">system: <a name="akka.actor.ActorSystem" class="extype" href="../actor/ActorSystem.html">ActorSystem</a></span>)</span>
      </span>
      </h4>
      
    </li></ol>
            </div>

        

        

        <div class="values members" id="values">
              <h3>Value Members</h3>
              <ol><li visbl="pub" name="scala.AnyRef#!=" data-isabs="false">
      <a id="!=(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">!=</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#!=" data-isabs="false">
      <a id="!=(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">!=</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef###" data-isabs="false">
      <a id="##():Int"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">##</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#==" data-isabs="false">
      <a id="==(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">==</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#==" data-isabs="false">
      <a id="==(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">==</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="akka.agent.Agent#alter" data-isabs="false">
      <a id="alter(Function[T, T],Long):Future[T]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">alter</span>
        
        <span class="params">(<span name="f">f: <a name="akka.japi.Function" class="extype" href="../japi/Function.html">Function</a>[T, T]</span>, <span name="timeout">timeout: <span name="scala.Long" class="extype">Long</span></span>)</span><span class="result">: <a name="akka.dispatch.Future" class="extype" href="../dispatch/Future.html">Future</a>[T]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Java API
Dispatch a function to update the internal state, and return a Future where that new state can be obtained
within the given timeout
</p>
    </li><li visbl="pub" name="akka.agent.Agent#alter" data-isabs="false">
      <a id="alter((T) ⇒ T)(Timeout):Future[T]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">alter</span>
        
        <span class="params">(<span name="f">f: (T) ⇒ T</span>)</span><span class="params">(<span name="timeout">timeout: <a name="akka.util.Timeout" class="extype" href="../util/Timeout.html">Timeout</a></span>)</span><span class="result">: <a name="akka.dispatch.Future" class="extype" href="../dispatch/Future.html">Future</a>[T]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Dispatch a function to update the internal state, and return a Future where
that new state can be obtained within the given timeout.</p>
    </li><li visbl="pub" name="akka.agent.Agent#alterOff" data-isabs="false">
      <a id="alterOff(Function[T, T],Long):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">alterOff</span>
        
        <span class="params">(<span name="f">f: <a name="akka.japi.Function" class="extype" href="../japi/Function.html">Function</a>[T, T]</span>, <span name="timeout">timeout: <span name="scala.Long" class="extype">Long</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Java API:
Dispatch a function to update the internal state but on its own thread,
and return a Future where that new state can be obtained within the given timeout.</p><div class="fullcomment"><div class="comment cmt"><p>Java API:
Dispatch a function to update the internal state but on its own thread,
and return a Future where that new state can be obtained within the given timeout.
This does not use the reactive thread pool and can be used for long-running
or blocking operations. Dispatches using either <code>alterOff</code> or <code>alter</code> will
still be executed in order.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#alterOff" data-isabs="false">
      <a id="alterOff((T) ⇒ T)(Timeout):Future[T]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">alterOff</span>
        
        <span class="params">(<span name="f">f: (T) ⇒ T</span>)</span><span class="params">(<span name="timeout">timeout: <a name="akka.util.Timeout" class="extype" href="../util/Timeout.html">Timeout</a></span>)</span><span class="result">: <a name="akka.dispatch.Future" class="extype" href="../dispatch/Future.html">Future</a>[T]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Dispatch a function to update the internal state but on its own thread,
and return a Future where that new state can be obtained within the given timeout.</p><div class="fullcomment"><div class="comment cmt"><p>Dispatch a function to update the internal state but on its own thread,
and return a Future where that new state can be obtained within the given timeout.
This does not use the reactive thread pool and can be used for long-running
or blocking operations. Dispatches using either <code>alterOff</code> or <code>alter</code> will
still be executed in order.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#apply" data-isabs="false">
      <a id="apply():T"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">apply</span>
        
        <span class="params">()</span><span class="result">: T</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Read the internal state of the agent.</p>
    </li><li visbl="pub" name="scala.Any#asInstanceOf" data-isabs="false">
      <a id="asInstanceOf[T0]:T0"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">asInstanceOf</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="result">: T0</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="akka.agent.Agent#await" data-isabs="false">
      <a id="await(Timeout):T"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">await</span>
        
        <span class="params">(<span class="implicit">implicit </span><span name="timeout">timeout: <a name="akka.util.Timeout" class="extype" href="../util/Timeout.html">Timeout</a></span>)</span><span class="result">: T</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Gets this agent's value after all currently queued updates have completed.</p>
    </li><li visbl="prt" name="scala.AnyRef#clone" data-isabs="false">
      <a id="clone():AnyRef"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">clone</span>
        
        <span class="params">()</span><span class="result">: AnyRef</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="akka.agent.Agent#close" data-isabs="false">
      <a id="close():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">close</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Closes the agents and makes it eligible for garbage collection.</p><div class="fullcomment"><div class="comment cmt"><p>Closes the agents and makes it eligible for garbage collection.
A closed agent cannot accept any <code>send</code> actions.
</p></div></div>
    </li><li visbl="pub" name="scala.AnyRef#eq" data-isabs="false">
      <a id="eq(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">eq</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#equals" data-isabs="false">
      <a id="equals(Any):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">equals</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="prt" name="scala.AnyRef#finalize" data-isabs="false">
      <a id="finalize():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">finalize</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="akka.agent.Agent#flatMap" data-isabs="false">
      <a id="flatMap[B](Function[T, Agent[B]]):Agent[B]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">flatMap</span>
        <span class="tparams">[<span name="B">B</span>]</span>
        <span class="params">(<span name="f">f: <a name="akka.japi.Function" class="extype" href="../japi/Function.html">Function</a>[T, <a name="akka.agent.Agent" class="extype" href="">Agent</a>[B]]</span>)</span><span class="result">: <a name="akka.agent.Agent" class="extype" href="">Agent</a>[B]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Java API:
Flatmap this agent to a new agent, applying the function to the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Java API:
Flatmap this agent to a new agent, applying the function to the internal state.
Does not change the value of this agent.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#flatMap" data-isabs="false">
      <a id="flatMap[B]((T) ⇒ Agent[B]):Agent[B]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">flatMap</span>
        <span class="tparams">[<span name="B">B</span>]</span>
        <span class="params">(<span name="f">f: (T) ⇒ <a name="akka.agent.Agent" class="extype" href="">Agent</a>[B]</span>)</span><span class="result">: <a name="akka.agent.Agent" class="extype" href="">Agent</a>[B]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Flatmap this agent to a new agent, applying the function to the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Flatmap this agent to a new agent, applying the function to the internal state.
Does not change the value of this agent.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#foreach" data-isabs="false">
      <a id="foreach(Procedure[T]):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">foreach</span>
        
        <span class="params">(<span name="f">f: <a name="akka.japi.Procedure" class="extype" href="../japi/Procedure.html">Procedure</a>[T]</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Java API:
Applies the function to the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Java API:
Applies the function to the internal state. Does not change the value of this agent.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#foreach" data-isabs="false">
      <a id="foreach[U]((T) ⇒ U):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">foreach</span>
        <span class="tparams">[<span name="U">U</span>]</span>
        <span class="params">(<span name="f">f: (T) ⇒ U</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Applies the function to the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Applies the function to the internal state. Does not change the value of this agent.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#future" data-isabs="false">
      <a id="future(Timeout):Future[T]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">future</span>
        
        <span class="params">(<span class="implicit">implicit </span><span name="timeout">timeout: <a name="akka.util.Timeout" class="extype" href="../util/Timeout.html">Timeout</a></span>)</span><span class="result">: <a name="akka.dispatch.Future" class="extype" href="../dispatch/Future.html">Future</a>[T]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">A future to the current value that will be completed after any currently
queued updates.</p>
    </li><li visbl="pub" name="akka.agent.Agent#get" data-isabs="false">
      <a id="get():T"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">get</span>
        
        <span class="params">()</span><span class="result">: T</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Read the internal state of the agent.</p>
    </li><li visbl="pub" name="scala.AnyRef#getClass" data-isabs="false">
      <a id="getClass():java.lang.Class[_]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">getClass</span>
        
        <span class="params">()</span><span class="result">: java.lang.Class[_]</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#hashCode" data-isabs="false">
      <a id="hashCode():Int"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">hashCode</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="scala.Any#isInstanceOf" data-isabs="false">
      <a id="isInstanceOf[T0]:Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">isInstanceOf</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
    </li><li visbl="pub" name="akka.agent.Agent#map" data-isabs="false">
      <a id="map[B](Function[T, B]):Agent[B]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">map</span>
        <span class="tparams">[<span name="B">B</span>]</span>
        <span class="params">(<span name="f">f: <a name="akka.japi.Function" class="extype" href="../japi/Function.html">Function</a>[T, B]</span>)</span><span class="result">: <a name="akka.agent.Agent" class="extype" href="">Agent</a>[B]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Java API:
Map this agent to a new agent, applying the function to the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Java API:
Map this agent to a new agent, applying the function to the internal state.
Does not change the value of this agent.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#map" data-isabs="false">
      <a id="map[B]((T) ⇒ B):Agent[B]"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">map</span>
        <span class="tparams">[<span name="B">B</span>]</span>
        <span class="params">(<span name="f">f: (T) ⇒ B</span>)</span><span class="result">: <a name="akka.agent.Agent" class="extype" href="">Agent</a>[B]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Map this agent to a new agent, applying the function to the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Map this agent to a new agent, applying the function to the internal state.
Does not change the value of this agent.
</p></div></div>
    </li><li visbl="pub" name="scala.AnyRef#ne" data-isabs="false">
      <a id="ne(AnyRef):Boolean"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">ne</span>
        
        <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#notify" data-isabs="false">
      <a id="notify():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">notify</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#notifyAll" data-isabs="false">
      <a id="notifyAll():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">notifyAll</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="akka.agent.Agent#resume" data-isabs="false">
      <a id="resume():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">resume</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Resumes processing of <code>send</code> actions for the agent.</p>
    </li><li visbl="pub" name="akka.agent.Agent#send" data-isabs="false">
      <a id="send(Function[T, T]):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">send</span>
        
        <span class="params">(<span name="f">f: <a name="akka.japi.Function" class="extype" href="../japi/Function.html">Function</a>[T, T]</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Java API:
Dispatch a function to update the internal state.</p>
    </li><li visbl="pub" name="akka.agent.Agent#send" data-isabs="false">
      <a id="send(T):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">send</span>
        
        <span class="params">(<span name="newValue">newValue: T</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Dispatch a new value for the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Dispatch a new value for the internal state. Behaves the same
as sending a function (x =&gt; newValue).
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#send" data-isabs="false">
      <a id="send((T) ⇒ T):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">send</span>
        
        <span class="params">(<span name="f">f: (T) ⇒ T</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Dispatch a function to update the internal state.</p>
    </li><li visbl="pub" name="akka.agent.Agent#sendOff" data-isabs="false">
      <a id="sendOff(Function[T, T]):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">sendOff</span>
        
        <span class="params">(<span name="f">f: <a name="akka.japi.Function" class="extype" href="../japi/Function.html">Function</a>[T, T]</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Java API:
Dispatch a function to update the internal state but on its own thread.</p><div class="fullcomment"><div class="comment cmt"><p>Java API:
Dispatch a function to update the internal state but on its own thread.
This does not use the reactive thread pool and can be used for long-running
or blocking operations. Dispatches using either <code>sendOff</code> or <code>send</code> will
still be executed in order.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#sendOff" data-isabs="false">
      <a id="sendOff((T) ⇒ T):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">sendOff</span>
        
        <span class="params">(<span name="f">f: (T) ⇒ T</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Dispatch a function to update the internal state but on its own thread.</p><div class="fullcomment"><div class="comment cmt"><p>Dispatch a function to update the internal state but on its own thread.
This does not use the reactive thread pool and can be used for long-running
or blocking operations. Dispatches using either <code>sendOff</code> or <code>send</code> will
still be executed in order.
</p></div></div>
    </li><li visbl="pub" name="akka.agent.Agent#suspend" data-isabs="false">
      <a id="suspend():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">suspend</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Suspends processing of <code>send</code> actions for the agent.</p>
    </li><li visbl="pub" name="scala.AnyRef#synchronized" data-isabs="false">
      <a id="synchronized[T0](⇒ T0):T0"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">synchronized</span>
        <span class="tparams">[<span name="T0">T0</span>]</span>
        <span class="params">(<span name="arg0">arg0: ⇒ T0</span>)</span><span class="result">: T0</span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#toString" data-isabs="false">
      <a id="toString():String"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">toString</span>
        
        <span class="params">()</span><span class="result">: <span name="java.lang.String" class="extype">String</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div>
    </li><li visbl="pub" name="akka.agent.Agent#update" data-isabs="false">
      <a id="update(T):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">update</span>
        
        <span class="params">(<span name="newValue">newValue: T</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Dispatch a new value for the internal state.</p><div class="fullcomment"><div class="comment cmt"><p>Dispatch a new value for the internal state. Behaves the same
as sending a function (x =&gt; newValue).
</p></div></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait():Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">wait</span>
        
        <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait(Long,Int):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">wait</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>, <span name="arg1">arg1: <span name="scala.Int" class="extype">Int</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
      <a id="wait(Long):Unit"></a>
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">wait</span>
        
        <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
      </span>
      </h4>
      <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
                <span class="name">@throws</span><span class="args">()</span>
              
        </dd></dl></div>
    </li></ol>
            </div>

        

        <div name="scala.AnyRef" class="parent">
              <h3>Inherited from AnyRef</h3>
            </div><div name="scala.Any" class="parent">
              <h3>Inherited from <span name="scala.Any" class="extype">Any</span></h3>
            </div>

      </div>

      <div id="tooltip"></div>

    </body>
      </html>